package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.TypeWorkVo;
import com.koocloud.electroplatemanage.pojo.WorkTimeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: electroplatemanage
 * @description: 工时Mapper接口
 * @author: zww
 * @create: 2020-09-29 15:55
 */
@Mapper
public interface WorkTimeMapper {
    //通过pk查询一条记录
    WorkTimeVo selectByPk(String workTimeCode);
    //通过pk查询一条记录  delete_flag = "0"
    WorkTimeVo selectByCode(String workTimeCode);
    //通过图号+工种查询一条记录
    WorkTimeVo selectByDrawNoTypeWork(@Param("drawNoCode") String drawNoCode, @Param("typeworkCode")String typeworkCode);

    //查询所有记录
    List<WorkTimeVo> selectAllData(WorkTimeVo workTimeVo);

    //根据状态进行模糊查询 启用为1 禁用为0
    List<WorkTimeVo> selectByDeleteFlag(WorkTimeVo workTimeVo);
    //插入一条记录
    int insert(WorkTimeVo workTimeVo);
    //批量插入记录
    int batchInsert(List<WorkTimeVo> listWorkTimeVo);
    //逻辑删除一条记录
    int delete(@Param("workTimeCode")String workTimeCode, @Param("deleteFlag") String deleteFlag);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(WorkTimeVo workTimeVo);

    //修改一条记录 delete_flag
    int updateFlag(WorkTimeVo workTimeVo);
    //获取工时总数
    int selectAmount();

}
